Integrated memory controller

ABSTRACT

A system and circuit for reading and writing data to a buffer memory, which is Synchronous Dynamic Random access Memory (“SDRAM”), or Double Data Rate-Synchronous Dynamic Random Access Memory (“DDR”) is provided. The circuit includes logic for managing programmable clock signal relationships such that data arrives at an optimum time for writing. Data that is to be written at DDR is moved from a first buffer clock to a DDR write clock signal and to a DQS signal that is based on a SDRAM clock signal. Also, plural tap-cells may be used to delay clock signals such that data and clock signals are aligned. An emulated DQS signal in a DDR capture scheme is used for reading from a SDRAM.

BACKGROUND OF THE INVENTION

1. Field Of the Invention

The present invention relates generally to storage device controllers,and more particularly, to integrated memory controllers.

2. Background

Conventional computer systems typically include several functionalcomponents. These components may include a central processing unit(CPU), main memory, input/output (“I/O”) devices, and streaming storagedevices (for example, tape drives) (referred to herein as “storagedevice”). In conventional systems, the main memory is coupled to the CPUvia a system bus or a local memory bus. The main memory is used toprovide the CPU access to data and/or program information that is storedin main memory at execution time. Typically, the main memory is composedof random access memory (RAM) circuits. A computer system with the CPUand main memory is often referred to as a host system.

The storage device is coupled to the host system via a controller thathandles complex details of interfacing the storage devices to the hostsystem. Communications between the host system and the controller isusually provided using one of a variety of standard I/O bus interfaces.

Typically, when data is read from a storage device, a host system sendsa read command to the controller, which stores the read command into thebuffer memory. Data is read from the device and stored in the buffermemory.

Buffer memory may be a Synchronous Dynamic Random access Memory(“SDRAM”), or Double Data Rate-Synchronous Dynamic Random Access Memory(referred to as “DDR”). In SDRAM communication occurs at the positiveend of a clock signal, i.e. data is received and read at the positiveedge of a clock. Hence, SDRAM is a single data rate memory device.

DDR is a type of SDRAM that supports data transfers on both edges ofeach clock cycle (the rising and falling edges), effectively doublingthe memory chip's data throughput. In DDR address and commands aresimilar to SDRAM, but the data is handled differently by using aseparate clock (“DQS”). DQS is used for receiving and sending data fromthe DDR.

Modern storage systems may use either SDRAM or DDR and it is desirableto have a single interface that supports both DDR and SDRAM read andwrite operations. Conventional systems do not provide this option.

Therefore, there is a need for a method and system to support both DDRand SDRAM using the same hardware in the controller.

SUMMARY OF THE INVENTION

A system for writing data to a buffer memory, which is SynchronousDynamic Random access Memory (“SDRAM”), or Double Data Rate-SynchronousDynamic Random Access Memory (“DDR”) is provided. The system includes,means for managing programmable clock signal relationships such thatdata arrives at an optimum time for writing. Data that is to be writtenat DDR is moved from a first buffer clock to a DDR write clock and to aDQS signal that is based on a SDRAM clock signal.

A circuit for writing data to a buffer memory, which is SynchronousDynamic Random access Memory (“SDRAM”), or Double Data Rate-SynchronousDynamic Random Access Memory (“DDR”) is provided. The circuit includeslogic for managing programmable clock signal relationships such thatdata arrives at an optimum time for writing. Data that is to be writtenat DDR is moved from a first buffer clock to a DDR write clock signaland to a DQS signal that is based on a SDRAM clock signal. Also, pluraltap-cells may be used to delay clock signals such that data and clocksignals are aligned.

A circuit for reading data from a buffer memory, which is SynchronousDynamic Random access Memory (“SDRAM”), or Double Data Rate-SynchronousDynamic Random Access Memory (“DDR”) is provided. The circuit includeslogic for managing programmable clock signal relationships such thatdata that is read from the DDR is centered within a DQS signal, which isgenerated from the DDR and then appropriately delayed. The DQS signal isdelayed with respect to the data that is read from the DDR and data fromthe DDR is placed in a register that is controlled by a delayed DQSsignal.

A system for reading data from a buffer memory, which is SynchronousDynamic Random access Memory (“SDRAM”), or Double Data Rate-SynchronousDynamic Random Access Memory (“DDR”) is provided. The system includesmeans for managing programmable clock signal relationships such thatdata that is read from the DDR is centered within a DQS signal generatedfrom the DDR and then appropriately delayed. The DQS signal is delayedwith respect to the data that is read from the DDR and data from the DDRis placed in a register that is controlled by a delayed DQS signal.Also, an emulated DQS signal in an SDRAM clock signal is used forreading from a SDRAM and a DDR capture scheme is used for reading datafrom an SDRAM.

This brief summary has been provided so that the nature of the inventionmay be understood quickly. A more complete understanding of theinvention can be obtained by reference to the following detaileddescription of the preferred embodiments thereof concerning the attacheddrawings.

BRIEF DESCRIPTION OF THE DRAWINGS

The foregoing features and other features of the present invention willnow be described with reference to the drawings of a preferredembodiment. In the drawings, the same components have the same referencenumerals. The illustrated embodiment is intended to illustrate, but notto limit the invention. The drawings include the following Figures:

FIG. 1A is an example of a streaming storage drive system used accordingto one aspect of the present invention;

FIG. 1B is a block diagram of a buffer controller, according to oneaspect of the present invention;

FIG. 1C is a block diagram of a clock distribution module, according toone aspect of the present invention;

FIG. 1D is a block diagram of a DDR memory coupled to a controller,according to one aspect of the present invention;

FIG. 1E shows a SDRAM coupled to a controller, according to one aspectof the present invention;

FIG. 1F shows a timing diagram for SDRAM signals,

FIG. 1G shows DDR write signals used according to one aspect of thepresent invention;

FIG. 1H is a block diagram showing an emulated DQS signal for an SDRAMoperation, according to one aspect of the present invention;

FIG. 2 shows DDR logic that can also be used for SDRAM read operationsusing an emulated DQS signal, according to one aspect of the presentinvention;

FIGS. 3-6 show various timing diagrams, according to one aspect of thepresent invention;

FIG. 7 shows a logic diagram for write operation, according to oneaspect of the present invention; and

FIGS. 8-9 show timing diagrams, according to one aspect of the presentinvention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

To facilitate an understanding of the preferred embodiment, the generalarchitecture and operation of a controller will initially be described.The specific architecture and operation of the preferred embodiment willthen be described with reference to the general architecture.

The system of FIG. 1A is an example of a streaming storage drive system(e.g., tape drive), included (or coupled to) in a computer system. Thehost computer (not shown) and the storage device 115 communicate viaport 102, which is connected to a data bus (not shown). The data bus,for example, is a bus in accordance with a Small Computer SystemInterface (SCSI) specification. Those skilled in the art will appreciatethat other communication buses known in the art can be used to transferdata between the drive and the host system. In an alternate embodiment(not shown), the storage device 115 is an external storage device, whichis connected to the host computer via a data bus.

As shown in FIG. 1A, the system includes controller 101, which iscoupled to SCSI port 102, port 114, buffer memory 111 and microprocessor100. Interface 118 serves to couple microprocessor bus 107 tomicroprocessor 100. A read only memory (“ROM”) omitted from the drawingis used to store firmware code executed by microprocessor 100. Port 114couples controller 101 to device 115.

Controller 101 can be an integrated circuit (IC) that comprises ofvarious functional modules, which provide for the writing and reading ofdata stored on storage device 115. Microprocessor 100 is coupled tocontroller 101 via interface 118 to facilitate transfer of data,address, timing and control information. Buffer memory 111 is coupled tocontroller 101 via ports to facilitate transfer of data, timing andaddress information. Buffer memory 111 may be a DDR or SDRAM.

Data flow controller 116 is connected to microprocessor bus 107 and tobuffer controller 108. A DMA interface 112 is connected tomicroprocessor bus 107 and to data and control port 113.

SCSI controller 105 includes programmable registers and state machinesequencers that interface with SCSI port 102 on one side and to a fast,buffered direct memory access (DMA) channel on the other side.

Sequencer 106 supports customized SCSI sequences, for example, by meansof a 256-location instruction memory that enables users to customizecommand automation features. Sequencer 106 support's firmware andhardware interrupts schemes. The firmware interrupt enablesmicroprocessor 100 to initiate an operation within Sequencer 106 withoutstopping sequencer operation. Hardware interrupt comes directly fromSCSI controller 105.

Buffer controller (also referred to as “BC”) 108 connects to buffermemory 111, DMA I/F 112, a SCSI channel of SCSI controller 105 and bus107. Buffer controller 108 regulates data movement into and out ofbuffer memory 111.

To read data from storage device 115, a host system sends a read commandto controller 101, which stores the read, commands in buffer memory 111.Microprocessor 100 then read the command out of buffer memory 111 andinitializes the various functional blocks of controller 101. Data isread from device 115 and is passed through DMA I/F 112 to buffercontroller 108.

Controller 101 also includes a clock distribution module (“CDM”) 120that handles clock variation, according to one aspect of the presentinvention. FIG. 1C shows a block diagram of CDM 120 with an oscillator119 coupled to phased locked loop (“PLL”) 120A that includes anelectronic circuit that controls oscillator 119 so that it maintains aconstant phase angle (i.e., lock) on the frequency of an input, orreference, signal. PLL 120A is coupled to a voltage regulator (“VCO”)703 and to clock distribution logic (“CDL”) 121 that generates a bufferclock (“BUFCLK”) 701A.

FIG. 1B shows a block diagram of BC 108 with Channel 1 108A and Channel0 108D for moving data to and from buffer 111. BC 108 includes registers108E and an Arbiter 108C. Arbiter 108C arbitrates between pluralchannels in BC 108, for example, Channel 0 108D and Channel 1 108A.Register 108E is coupled to interface 118 via bus 107 that allowsmicroprocessor 100 and BC 108 to communicate. Data 108G and status 108Fis moved in and out of register 108E.

BC 108 also includes a multi-channel memory controller 108B thatprovides a common interface to either SDRAM or DDR buffer memory 111.

Before describing the adaptive aspects of the present invention, thefollowing describes some of the clock signals that are used for buffer111 read and write operations:

BUFCLK (Buffer Clock Signal): This is a clock signal that is used forrunning various modules of the memory controller 108B.

SDRAMCLK (SDRAM Clock Signal): This is a clock signal for SDRAM 111B.

DQS: This signal is used for sampling data.

DDR Write CLK: This clock signal is used for writing to DDR 111A.

BD_O: This is a buffer data output signal.

FIG. 1D shows a top-level diagram where DDR 111A is the buffer memory111. SDRAMCLK generated from controller 101 is sent to DDR 111A, whileDQS (that is based on SDRAM CLK) and data comes from DDR 111A for a readoperation. For a write operation, DQS is sent to DDR 111A, as describedbelow in detail. As stated above, DQS is a bi-directional signal.

FIG. 1E shows a block diagram where SDRAM 111B is coupled to controller101. Data (“BD”) is read from SDRAM 111B and SDRAM clock is sent fromcontroller 101. Data (“BD”) moves bi0directionally from to/from SDRAM111B.

In one aspect of the present invention, a system is provided such that abuffer clock (BUFFCLCK), SDRAM clock (SDRAMCLK) and a DDR data clock(“DQS”) are handled in such a way that the same system (or logic) can beused to support either a DDR or SDRAM version of buffer memory 111.

DDR Write Operation:

In one aspect of the present invention a DDR write operation isconducted using programmable delay so that data arrives at the correcttime outside controller 101. Data that is to be written at DDR 111A ismoved from BUFCLK to DDR Write CLK, and DQS is appropriately delayed fordata sampling, as discussed below.

FIG. 7 shows a schematic of the logic used for a DDR write operation. Itis noteworthy that the same logic is used for SDRAM write operation.

For DDR write, all signals go from controller 101 to DDR 111A. Thearrival time for data and DQS signal 718 are based on the timing diagramshown in FIG. 8. The clocks are aligned such that data lines up with theclock. The present invention uses a clocking relationship instead ofdelaying data. The programmable timing delays between BUFCLK 701A,SDRAMCLK 707, and DQS CLK 718 are provided by tap-cells 702, 704, 704Band 705 that are driven by voltage controlled oscillator (“VCO”) 703.

Data that is written in DDR 111A is stored in registers 711 and 712 thatare controlled by BUFCLK 701A using logic 710. In one aspect, registers711 and 712 are 64 bits wide to hold data. Data from registers 711 and712 (shown as 712A and 712B via logic 711A and 711B) is moved toregisters 713 and 714 that receive the DDR Write CLk 720 from tap cell702. Signal 720 may be delayed using cell 702A.

BD_O 715 (data output) is generated based on inputs 713A and 714A fromregisters 713 and 714 (via multiplexer 715A), respectively. Input/Output(“I/O”) cell 724 generates BD 716, which is the actual data that is sentto DDR 111A.

DQS_O (DQS output) signal 719 is generated based on DQS free runningsignal 704A generated from tap cell 704 and 701B signal from DQS enablelogic 701. DQS enable logic 701 receives BUFCLK 701A and generatessignal 701B to enable the DQS signal. Signal 704A and 701B are “ANDED”by gate 720A to generate DQS_O 719. Thereafter, DQS_O 719 is sent to I/Ocell 723 that generates DQS 718 that is sent to DDR 111A.

SDRAMCLK 707 is generated by input/output (I/O) cell 721 based on signal706 generated (or delayed using cell 705A) by tap cell 705.

Control address logic 709 receives BUFCLK 701A and delay signal 708 fromtap-cell 704B. I/O cell 722 generates control address 722A that is sentto DDR 111A that determines where data is written.

FIG. 8 shows a timing diagram of various signals from FIG. 7, accordingto the adaptive aspects of the present invention. FIG. 8 shows thatSDRAMCLK 707 and BUFCLK 701A are synchronous. Output I/O cell delay 707Ais based on I/O cell 721. BD_O delay is based on I/O cell 724. tDH(718A) is the DDR data hold time based on DQS 718 for DDR writes, whiletDS (718B) is the data setup time based on DQS 718 for DDR writes. CLSK707B is the clock skew between BUFCLK 701A and SDRAMCLK 707. IDQSS 718Cis the first DQS rising edge for DDR write bursts, while tWPRE 718D isthe time that DQS 718 is low before the first rising edge. TWPST 718E isthe time DQS 718 is low after the last DQS 718 falling edge. DDR data(shown as BD 716 in FIG. 7) 716 is sampled (DO) at the rising edge ofDQS 718 and D1 is sampled at the falling edge of 718.

BUFCLK 701A is re-timed to DDR write clock 720 that is generated by tapcell 702. DQS 718 is aligned to the center of BD_O 715. DQS signal 718is timed so that it is later than SDRAMCLK_O 706 to provide set-up timefrom the start of the “data valid” window. The negative edge of BUFFCLK701A is used to control the enabling of DQS_O clock 719. The timing forDQS 718 is optimum so that it is not too early or late.

FIG. 8A shows a simplified timing diagram with SDRAMCLK 707, DQS 718 anddata 716 signals. FIG. 8A shows that data 716 is sampled at the risingand falling edge of DQS 718 and DQS 718 is approximately in the middleof data 716.

FIG. 1G shows yet another simplified timing diagram showing how DQS 718and data 716 are positioned for DDR 111A write operation.

DDR Read Operation:

FIG. 2 shows a schematic of the logic that is used for reading data fromDDR 111A and SDRAM 111B. DQS 209 and data 206 are generated from DDR111A. The DQS 209 clock signal is generated based on SDRAMCLK 707, whichis based on input 706 to I/O cell 721. DQS 209 clock signal is sent toI/O cell 208 that generates DQS_I 210, which is delayed by cell 211. DQS209 is delayed so that the DQS clock signal is centered within a validdata window.

Registers 202 and 202A are used to capture data and in one aspectoperate as a first in first out (“FIFO”) buffer. The delayed DQS 211Asignal that is referenced as BDIN_CLK 212 and 212B (that is generatedafter 211A passes through an inverter 211B) is used to control registers202 and 202A, respectively. It is noteworthy that the delay in the DQSsignal may be programmed using cells 211C and 211D by controller 101firmware.

Data 206 from DDR 111A via I/O cell 205 (as output BD_I 207) is sent toregisters 202 and 202A, via logic 207A and 207B. Once data is capturedin registers 202 and 202A, it is moved (shown as 213 and 214) to anotherFIFO 201 that operates under BUFCLK 701A.

DQS 209 generated from DDR 111A may have plural alignments. Logic 203and 204 controls the alignment of DQS 209 based on selected latency. Forexample, in one aspect (CL3, FIG. 3), the positive edge of DQS isaligned with the positive edge of SDRAMCLK 707 generated by I/O cell 721based on SDRAMCLK_O 706, which is generated by VCO 703. In anotheraspect (CL2.5, FIG. 3), the negative edge of DQS is aligned with thenegative edge. FIG. 3 shows alignment of data with SDRAMCLK 707 within±tAC nano-seconds.

FIG. 4 shows the alignment of DQS 211A to SDRAMCLK 707 with latency CL 3and CL 2.5, respectively. In CL3, the positive edge of DQS 211A isaligned with the positive edge of SDRAMCLK and in CL 2.5, the negativeedge of DQS 211A is aligned with the positive edge of SDRAMCLK 707. InCL 3, the first data of the burst is valid 3 clocks after the risingedge of the read command. In CL 2.5, the first data of the burst isvalid 2.5 clocks after the rising edge of the read command. The risingedge of DQS 211A is lined up with the leading edge of the first validdata window.

DQS 211A can vary by tDQSCK 400. Although the alignment of DQS 211A toSDRAMCLK 707 does not directly affect the loading of data into registers202 and 202A, it does affect the positioning of BDIN_REG CLK 212 withrespect to BUFCLK 701A.

FIG. 5 shows a timing diagram of DQS 211A and data 207. In this case DQS211A can vary by tDQSQ 500 nano-seconds.

FIG. 6 shows the timing for data capture, where DQS 211A is delayed toprovide setup/hold margin between clock and data inputs of registers 202and 202A. “tDQSQ” is the data skew from DQS 211A, “tPDIN” is the I/Ocell delay to destination, and “tDQSPD” is additional delay for DQS211A.

SDRAM Write Operation:

SDRAM 111B write SDRAM CLK 707 that operates synchronously with BUFCLK701A controls operation. SDRAM CLK 707 may be delayed from BUFCLK 701Ato gain some set-up and hold time for the read operation. FIG. 1F showsa timing diagram for writing data to SDRAM 111B.

SDRAM Read Operation: FIG. 1H shows a top-level block diagram for anSDRAM 111B operation using the same logic fpr controller 101. DQS signalis emulated for an SDRAM 111B read operation. The SDRAM clock 707 is fedinto the DQS signal, which then becomes the emulated DQS signal. For anSDRAM 111B read operation, only the positive edge flop 202 (also shownin FIG. 2) is used. For a DDR operation both 202 and 202A are used. Byusing the SDRAM clock 707 and the emulated DQS signal, extra logic isnot required and hence this saves overall cost for controller 101.

SDRAM read operation is synchronous with SDRAMCLK 707 and BUFCLK 701A.In some instances, for example, at 183 MHZ, the data read delay (tSDRAC)from SDRAM 111B is equal to the clock period. FIG. 9 shows the timingdiagram for SDRAM 111B read operation at 183 MHz. It is noteworthy thatthe present invention is not limited to any particular frequency rate.FIG. 9 shows SDRAMCLK 707, BUFCLK 701A, data (“BD”) and BDIN Clocksignal (derived from BUFCLK) “tSDRAC” is the time SDRAM 111B data readoutput delay; “tSDROH” is the SDRAM data read output data hold-time; and“tPDIN” is the input I/O cell delay to destination.

In one aspect of the present invention, the same logic is used to readand/or write data to DDR or SDRAM, hence overall controller cost isreduced.

Although the present invention has been described with reference tospecific embodiments, these embodiments are illustrative only and notlimiting. Many other applications and embodiments of the presentinvention will be apparent in light of this disclosure.

1. A system for writing data to a buffer memory, which is SynchronousDynamic Random access Memory (“SDRAM”), or Double Data Rate-SynchronousDynamic Random Access Memory (“DDR”), comprising: means for managingprogrammable clock signal relationships such that data arrives at anoptimum time for writing.
 2. The system of claim 1, wherein data that isto be written at DDR is moved from a first buffer clock to a DDR writeclock and to a DQS signal that is based on a SDRAM clock signal.
 3. Thesystem of claim 2, wherein data is centered within the DQS signal.
 4. Acircuit for writing data to a buffer memory, which is SynchronousDynamic Random access Memory (“SDRAM”), or Double Data Rate-SynchronousDynamic Random Access Memory (“DDR”), comprising: logic for managingprogrammable clock signal relationships such that data arrives at anoptimum time for writing.
 5. The circuit of claim 4, wherein data thatis to be written at DDR is moved from a first buffer clock to a DDRwrite clock signal and to a DQS signal that is based on a SDRAM clocksignal.
 6. The circuit of claim 5, wherein the data is centered withinthe DQS signal.
 7. The circuit of claim 4, where plural tap-cells may beused to delay clock signals such that data and clock signals arealigned.
 8. A circuit for reading data from a buffer memory, which isSynchronous Dynamic Random access Memory (“SDRAM”), or Double DataRate-Synchronous Dynamic Random Access Memory (“DDR”), comprising: logicfor managing programmable clock signal relationships such that data thatis read from the DDR is centered within a DQS signal which is generatedfrom the DDR and then appropriately delayed.
 9. The circuit of claim 8,wherein the DQS signal is delayed with respect to the data that is readfrom the DDR.
 10. The circuit of claim 8, wherein data from the DDR isplaced in a register that is controlled by a delayed DQS signal.
 11. Asystem for reading data from a buffer memory, which is SynchronousDynamic Random access Memory (“SDRAM”), or Double Data Rate-SynchronousDynamic Random Access Memory (“DDR”), comprising: means for managingprogrammable clock signal relationships such that data that is read fromthe DDR is centered within a DQS signal generated from the DDR and thenappropriately delayed.
 12. The system of claim 11, wherein the DQSsignal is delayed with respect to the data that is read from the DDR.13. The system of claim 11, wherein data from the DDR is placed in aregister that is controlled by a delayed DQS signal.
 14. The system ofclaim 11, wherein an emulated DQS signal in an SDRAM clock signal isused for reading from a SDRAM.
 15. The system of claim 11, wherein a DDRcapture scheme is used for reading data from an SDRAM.